/**
 * Created by LeungZ on 2016/9/18.
 */
class ImageSrv {
    constructor(commonSrv) {
        "ngInject";
        this._commonSrv = commonSrv;
    }

    getImageList(page, filter) {
        return this._commonSrv('get', '/ctg-imageconsole-web/imageRepository/queryImageList', {
            pageSize: page.page || 10,
            pageNum: page.currentPage,
            imageName: filter && filter.imageName,
            imageType: filter && filter.imageType
        });
    }

    getImageDetail(para) {
        return this._commonSrv('get', '/ctg-imageconsole-web/imageRepository/queryImageInfo', {
            imageFileId: para.id
        });
    }

    getImageVers(para) {
        return this._commonSrv('get', '/ctg-imageconsole-web/imageRepository/queryPerVersionByImageId', {
            imageFileId: para.id,
            pageSize: para.page || 10,
            pageNum: para.currentPage
        });
    }
}
export default ImageSrv